# -*- coding: utf-8 -*-
"""
@author:  yinbing.li(yinbing.li@zillnk.com)
@version: 1.0.0
@file:    Leetcode283_移动零.py
@time:    2023/3/8 11:14
"""
from typing import List


class Solution:
    def moveZeroes(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        nums.sort(key=bool, reverse=True)

    def moveZeroes(self, nums: List[int]) -> None:
        n = nums.count(0)
        for _ in range(n):
            nums.remove(0)
        for _ in range(n):
            nums.append(0)
